package com.taxi.management.dao;

import com.taxi.management.entity.UserEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserDao {
    List<UserEntity> getAllUser();

    UserEntity doLogin(@Param("username") String username, @Param("password") String password);

    UserEntity getUserById(@Param("id") int id);

    int addUser(@Param("user") UserEntity user);

    int updateUser(@Param("user") UserEntity user);

    int deleteUser(@Param("id") int id);

    List<UserEntity> getUserByPage(
            @Param("username") String username,
            @Param("start") int start,
            @Param("limit") int limit
    );
}